<!DOCTYPE html>
<html lang="zh-CN">

	<head>
		<meta charset="UTF-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<title>招贤纳士</title>
		<link rel="icon" href="picture.ico" type="image/x-icon" />
		<link rel="stylesheet" href="css/bootstrap.min.css" />
		<link rel="stylesheet" href="css/bootstrap-theme.min.css" />
		<link rel="stylesheet" href="css/daohang.css" />
	</head>
	<style>
		* {
			font-family: "微软雅黑";
		}
@media (max-width:1200px ) {
html{
	width: 1180px;
}
}
		a:hover {
			border: none;
			text-decoration: none;
		}
		
		a:-webkit-any-link {
			text-decoration: none;
		}
		
		#daohang3>ul>li:nth-of-type(5)>a {
			color: #447ade;
		}
		
		.liebiao2>a>div:nth-of-type(1) {
			display: inline-block;
			width: 45px;
			height: 45px;
			overflow: hidden;
			vertical-align: top;
		}
		
		.liebiao2>a>div:nth-of-type(2)>div:nth-of-type(1) {
			color: #000;
		}
		
		.liebiao2:hover>a>div:nth-of-type(2)>div:nth-of-type(1) {
			color: #447ade;
		}
	</style>

	<body>
		<div id="daohang" class="navbar navbar-inverse navbar-fixed-top">
			<div style="width: 100%;background: #2e3a4b;color: white;text-align: right;line-height: 40px;">
				<div style="margin: 0 auto;" class="container">
					<img style="margin-right: 5px;vertical-align: middle;" src="images/ico_a.png" />
					<span style="vertical-align: middle;">客服热线：010-64449280</span>
				</div>
			</div>
			<div id="daohang2" class="container">
				<div class="navbar-header">
					<button class="navbar-toggle collapsed" type="button" data-toggle="collapse" data-target=".navbar-collapse">
			          <span class="sr-only">Toggle navigation</span>
			          <span class="icon-bar"></span>
			          <span class="icon-bar"></span>
			          <span class="icon-bar"></span>
			        </button>
			<a id="daohang4" class="navbar-brand hidden-sm" href="index.html" style="width: 60px;display: block !important;"><img style="width: 60px;" src="images/logo.png"></a>
				</div>
				<div id="daohang3" class="navbar-collapse collapse" role="navigation">
					<ul class="nav navbar-nav">
						<li>
							<a data-hover="dropdown" href="index.html">首页</a>
						</li>
						<li>
							<a data-hover="dropdown" href="companyteam.html">公司团队</a>
						</li>
						<li>
							<a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown">公司产品</a>
							<ul class="dropdown-menu">
								<li><a href="products1.html">RAK免疫细胞</a></li>
								<li><a href="products2.html">脐带间充质干细胞</a></li>
							</ul>
						</li>
						<li>
							<a data-hover="dropdown" href="journalism.html">新闻中心</a>
						</li>
						<li>
							<a data-hover="dropdown" href="recruit.html">招贤纳士</a>
						</li>
						<li>
							<a data-hover="dropdown" href="contactus.html">联系我们</a>
						</li>
					</ul>
				</div>
			</div>
		</div>
		<div class="headermargin">
			<img style="width: 100%;" src="images/zhaopin_banner.jpg" />
		</div>
		<div class="container neirong" style="padding: 50px 0;font-size: 16px;">

		</div>
		<div class="container" style="text-align: right;">
			<ul class="pagination">
				
			</ul>
		</div>	

		<div class="dibu">

		</div>
	</body>
	<script src="js/jquery-3.1.1.min.js"></script>
	<script src="js/bootstrap.min.js"></script>
	<script src="js/bootstrap-hover-dropdown.js"></script>
	<script src="js/server.js"></script>
	<script>
		/*导入头部和尾部*/
		$(document).ready(function() {
			$(".dibu").load("footer.html");
		});

		$.ajax({
			url: server_name+'/wsapi-project-zhaopin',
			type: 'get',
			dataType: 'json',
			success: function(data) {
				var page = data.sum_page;
				var p    = data.p;
				
				var data = data.data
				var str = '';
				for(var i = 0; i < data.length; i++) {
					str += '<div class="liebiao2" style="padding: 20px 0;">'
					str += '<a href="recruitdatail.html?id=' + data[i]['id'] + '">'
					str += '<div><img style="width: 80%;height: 80%;" src="images/zhaopin_a.png"></div>'
					str += '<div style="display: inline-block;width:1060px;margin-left: 30px;vertical-align: top;">'
					str += '<div style="font-size: 18px;position: relative;font-weight: 600;">'
					str += '<span>' + data[i]['title'] + '</span>'
					str += '<div style="position: absolute;top:0;right: 20px;font-size: 14px;color: #447ade;">面议</div>'
					str += '</div>'
					str += '<div style="font-size: 16px;color: #666;margin-top: 5px;line-height: 30px;">' + data[i]['content'] + '</div>'
					str += '<div style="margin-top: 10px;">'
					str += '<div class="neiliankuai chuizhijuzhong" style="margin-right: 40px;">'
					str += '<img class="chuizhijuzhong" style="width:20px;" src="images/zhaopin_b.png" />'
					str += '<div class="neiliankuai chuizhijuzhong" style="color: #447ade;font-size: 12px;margin-left: 5px;">' + data[i]['add_time'] + '</div>'
					str += '</div>'
					str += '<div class="neiliankuai chuizhijuzhong">'
					str += '<img class="chuizhijuzhong" style="width:20px;" src="images/zhaopin_c.png" />'
					str += '<div class="neiliankuai chuizhijuzhong" style="color: #447ade;font-size: 12px;margin-left: 5px;">' + data[i]['click_count'] + '</div>'
					str += '</div>'
					str += '</div>'
					str += '</div>'
					str += '</a>'
					str += '</div>'
					str += '<hr style="height:1px;border:none;border-top:1px solid #666;"  />'
				}
				
				var last = Number(p)-1?Number(p)-1:1;
				if(p<page)
				{
					var next = Number(p)+1;
				}else{
					var next = page;
				}
				var str1 = '<li class="pp" val='+last+'><a href="javascript:;">&laquo;</a></li>';
				str1 += '<li class="pp" val="1"><a style="width:55px;" href="javascript:;">首页</a></li>';
				if(p>=5)
				{
					var left = p-4;
					if(left+9<page)
					{
						var right = left+9;
					}else
					{
						if(page - 9<=1){
							var left = 1;
						}else{
							var left = page - 9;
						}
						var right = page;
					}
				}else{
					var left  = 1;
					if(page<10)
					{
						var right = page;
					}else{
						var right = 10;
					}
				}
				for(var j = left ; j <= right; j ++ )
				{
					if(p == j)
					{
						str1+= '<li class="active pp" val='+j+'><a href="javascript:;">'+j+'</a></li>';
					}else{
						str1+= '<li class="pp" val='+j+'><a href="javascript:;">'+j+'</a></li>';
					}
					
				}	
				str1 += '<li class="pp" val='+page+'><a style="width:55px;" href="javascript:;">尾页</a></li>';
				str1 += '<li class="pp" val='+next+'><a href="javascript:;">&raquo;</a></li>';			
				$('.pagination').html(str1)
				$('.neirong').html(str)
			}
		})
		
		$(document).on('click','.pp',function(){
			var p = $(this).attr('val');
			$.ajax({
			url: server_name+'/wsapi-project-zhaopin',
			type: 'get',
			data: {
				p : p
			},
			dataType: 'json',
			success: function(data) {
				var page = data.sum_page;
				var p    = data.p;
				
				var data = data.data
				var str = '';
				for(var i = 0; i < data.length; i++) {
					str += '<div class="liebiao2" style="padding: 20px 0;">'
					str += '<a href="recruitdatail.html?id=' + data[i]['id'] + '">'
					str += '<div><img style="width: 100%;height: 100%;" src="images/zhaopin_a.png"></div>'
					str += '<div style="display: inline-block;width:1060px;margin-left: 50px;vertical-align: top;">'
					str += '<div style="font-size: 20px;position: relative;font-weight: 600;">'
					str += '<span>' + data[i]['title'] + '</span>'
					str += '<div style="position: absolute;top:0;right: 20px;font-size: 14px;color: #447ade;">面议</div>'
					str += '</div>'
					str += '<div style="font-size: 16px;color: #666;margin-top: 5px;line-height: 30px;">' + data[i]['content'] + '</div>'
					str += '<div style="margin-top: 10px;">'
					str += '<div class="neiliankuai chuizhijuzhong" style="margin-right: 40px;">'
					str += '<img class="chuizhijuzhong" src="images/zhaopin_b.png" />'
					str += '<div class="neiliankuai chuizhijuzhong" style="color: #447ade;font-size: 14px;margin-left: 5px;">' + data[i]['add_time'] + '</div>'
					str += '</div>'
					str += '<div class="neiliankuai chuizhijuzhong">'
					str += '<img class="chuizhijuzhong" src="images/zhaopin_c.png" />'
					str += '<div class="neiliankuai chuizhijuzhong" style="color: #447ade;font-size: 14px;margin-left: 5px;">' + data[i]['click_count'] + '</div>'
					str += '</div>'
					str += '</div>'
					str += '</div>'
					str += '</a>'
					str += '</div>'
					str += '<hr style="height:1px;border:none;border-top:1px solid #666;"  />'
				}
				
				var last = Number(p)-1?Number(p)-1:1;
				
				if(p<page)
				{
					var next = Number(p)+1;
				}else{
					var next = page;
				}
				
				var str1 = '<li class="pp" val='+last+'><a href="javascript:;">&laquo;</a></li>';
				str1 += '<li class="pp" val="1"><a style="width:55px;" href="javascript:;">首页</a></li>';
				if(p>=5)
				{
					var left = p-4;
					if(left+9<page)
					{
						var right = left+9;
					}else
					{
						if(page - 9<=1){
							var left = 1;
						}else{
							var left = page - 9;
						}
						var right = page;
					}
				}else{
					var left  = 1;
					if(page<10)
					{
						var right = page;
					}else{
						var right = 10;
					}
				}
				
				for(var j = left ; j <= right; j ++ )
				{
					if(p == j)
					{
						str1+= '<li class="active pp" val='+j+'><a href="javascript:;">'+j+'</a></li>';
					}else{
						str1+= '<li class="pp" val='+j+'><a href="javascript:;">'+j+'</a></li>';
					}
					
				}	
				str1 += '<li class="pp" val='+page+'><a style="width:55px;" href="javascript:;">尾页</a></li>';
				str1 += '<li class="pp" val='+next+'><a href="javascript:;">&raquo;</a></li>';
				$('.pagination').html(str1)
				$('.neirong').html(str)
			}
		})
		})
	</script>

</html>